package com.gameapplet.challenge.service.Impl;

import com.gameapplet.challenge.dao.IChallengeDao;
import com.gameapplet.challenge.model.Challenge;
import com.gameapplet.challenge.service.IChallengeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Map;
@Service("challengeService")
public class ChallengeServiceImpl implements IChallengeService{
    @Resource(name = "challengeDao")
    IChallengeDao challengeDao;

    @Override
    public int insertChallenge(Challenge challenge) {
        return challengeDao.insertChallenge(challenge);
    }

    @Override
    public Challenge selectChallengeByChallengeid(String challengeid) {
        return challengeDao.selectChallengeByChallengeid(challengeid);
    }

    @Override
    public Challenge selectChallengeByOpenid(String openid, String challengeid) {
        return challengeDao.selectChallengeByOpenid(openid,challengeid);
    }
}
